Skip to content

Conversation

RalfJung
Copy link
Member

No description provided.

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Oct 20, 2025
@RalfJung
Copy link
Member Author

@bors try
@rust-timer queue

@rust-timer

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Oct 20, 2025
perf experiment: try to replace box_new with write_via_move
@rust-bors

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Oct 20, 2025
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-bors
Copy link

rust-bors bot commented Oct 20, 2025

💔 Test for 6516a74 failed: CI. Failed jobs:

@rust-log-analyzer

This comment has been minimized.

@RalfJung
Copy link
Member Author

@bors try

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Oct 20, 2025
perf experiment: try to replace box_new with write_via_move
@rust-log-analyzer

This comment has been minimized.

@rust-bors
Copy link

rust-bors bot commented Oct 20, 2025

💔 Test for b7ef2e7 failed: CI. Failed jobs:

@rust-log-analyzer

This comment has been minimized.

@RalfJung
Copy link
Member Author

@bors try

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Oct 20, 2025
perf experiment: try to replace box_new with write_via_move
@rust-log-analyzer

This comment has been minimized.

@rust-bors
Copy link

rust-bors bot commented Oct 20, 2025

☀️ Try build successful (CI)
Build commit: 23a3fb3 (23a3fb398aa8883e29eb8f4dc5e50f725e7f5ab5, parent: fd847d4d5d5d1e96bde2d97635faec8655da6b18)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (23a3fb3): comparison URL.

Overall result: ❌ regressions - please read the text below

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @rustbot label: +perf-regression-triaged. If not, please fix the regressions and do another perf run. If its results are neutral or positive, the label will be automatically removed.

@bors rollup=never
@rustbot label: -S-waiting-on-perf +perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
0.7% [0.2%, 2.6%] 52
Regressions ❌
(secondary)
3.8% [0.1%, 21.6%] 52
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.1% [-0.1%, -0.1%] 4
All ❌✅ (primary) 0.7% [0.2%, 2.6%] 52

Max RSS (memory usage)

Results (primary 0.6%, secondary 0.9%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
1.9% [0.6%, 3.5%] 6
Regressions ❌
(secondary)
3.7% [1.8%, 7.2%] 12
Improvements ✅
(primary)
-2.1% [-3.4%, -0.4%] 3
Improvements ✅
(secondary)
-3.8% [-4.7%, -2.9%] 7
All ❌✅ (primary) 0.6% [-3.4%, 3.5%] 9

Cycles

Results (primary 2.0%, secondary 4.2%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
2.0% [2.0%, 2.0%] 1
Regressions ❌
(secondary)
6.2% [1.6%, 22.4%] 26
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.5% [-8.3%, -1.6%] 6
All ❌✅ (primary) 2.0% [2.0%, 2.0%] 1

Binary size

Results (primary 1.2%, secondary 9.6%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
1.3% [0.0%, 6.8%] 76
Regressions ❌
(secondary)
10.4% [0.4%, 45.8%] 36
Improvements ✅
(primary)
-0.1% [-0.3%, -0.0%] 10
Improvements ✅
(secondary)
-0.1% [-0.1%, -0.0%] 3
All ❌✅ (primary) 1.2% [-0.3%, 6.8%] 86

Bootstrap: 473.5s -> 472.703s (-0.17%)
Artifact size: 388.65 MiB -> 390.81 MiB (0.55%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Oct 20, 2025
@RalfJung
Copy link
Member Author

What happens if we only change Box::new but leave vec! unchanged?
@bors try
@rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Oct 20, 2025
perf experiment: try to replace box_new with write_via_move
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Oct 20, 2025
@rust-log-analyzer

This comment has been minimized.

@rust-bors
Copy link

rust-bors bot commented Oct 20, 2025

☀️ Try build successful (CI)
Build commit: 94a44ae (94a44aee86b4815327b2f7bdc1c8d9a9accbc8e0, parent: bd4a8004c2f3b73795cb4c03bf8e7634e4d89677)

@rust-timer

This comment has been minimized.

@RalfJung
Copy link
Member Author

Can we just queue a second run before the first one happened...?

@bors try
@rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Oct 20, 2025
perf experiment: try to replace box_new with write_via_move
$crate::boxed::Box::leak($crate::boxed::Box::new_uninit()).assume_init_mut()
},
[$($x),+],
))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dang, I think this is still wrong -- if $x panics, this won't deallocate the Box.

I was trying very hard to avoid having an intrinsic marked as safe that isn't actually safe, but that might not be possible. (We wouldn't need any of this if we had safe blocks but sadly, while they have been requested since Rust 1.0, we still don't have those.)

@rust-log-analyzer
Copy link
Collaborator

The job aarch64-gnu-llvm-20-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
---- [ui] tests/ui/async-await/post-cleanup-phase-validation.rs stdout ----

error: test compilation failed although it shouldn't!
status: exit status: 101
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/async-await/post-cleanup-phase-validation.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/async-await/post-cleanup-phase-validation" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "--edition=2024" "-Zvalidate-mir"
stdout: none
--- stderr -------------------------------
##[error]error: internal compiler error: compiler/rustc_mir_transform/src/lower_intrinsics.rs:204:29: Only passing a local is supported
  --> /checkout/tests/ui/async-await/post-cleanup-phase-validation.rs:17:9
   |
LL |         vec![async { HasDrop }.await];
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: this error: internal compiler error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)


thread 'rustc' (34185) panicked at compiler/rustc_mir_transform/src/lower_intrinsics.rs:204:29:
Box<dyn Any>
stack backtrace:
   0: std::panicking::begin_panic::<rustc_errors::ExplicitBug>
   1: <rustc_errors::diagnostic::BugAbort as rustc_errors::diagnostic::EmissionGuarantee>::emit_producing_guarantee
   2: <rustc_errors::DiagCtxtHandle>::span_bug::<rustc_span::span_encoding::Span, alloc::string::String>
   3: rustc_middle::util::bug::opt_span_bug_fmt::<rustc_span::span_encoding::Span>::{closure#0}
   4: rustc_middle::ty::context::tls::with_opt::<rustc_middle::util::bug::opt_span_bug_fmt<rustc_span::span_encoding::Span>::{closure#0}, !>::{closure#0}
   5: rustc_middle::ty::context::tls::with_context_opt::<rustc_middle::ty::context::tls::with_opt<rustc_middle::util::bug::opt_span_bug_fmt<rustc_span::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
   6: rustc_middle::util::bug::span_bug_fmt::<rustc_span::span_encoding::Span>
   7: <rustc_mir_transform::lower_intrinsics::LowerIntrinsics as rustc_mir_transform::pass_manager::MirPass>::run_pass
---
      [... omitted 3 frames ...]
  12: <rustc_middle::ty::context::TyCtxt>::coroutine_layout
  13: rustc_ty_utils::layout::layout_of_uncached
  14: rustc_ty_utils::layout::layout_of
      [... omitted 3 frames ...]
  15: <rustc_mir_transform::known_panics_lint::KnownPanicsLint as rustc_mir_transform::pass_manager::MirLint>::run_lint
  16: rustc_mir_transform::pass_manager::run_passes_inner
  17: rustc_mir_transform::run_analysis_to_runtime_passes
  18: rustc_mir_transform::mir_drops_elaborated_and_const_checked
      [... omitted 3 frames ...]
  19: <rustc_middle::ty::context::TyCtxt>::par_hir_body_owners::<rustc_interface::passes::run_required_analyses::{closure#1}::{closure#0}>::{closure#0}
  20: rustc_data_structures::sync::parallel::par_for_each_in::<&rustc_span::def_id::LocalDefId, &[rustc_span::def_id::LocalDefId], <rustc_middle::ty::context::TyCtxt>::par_hir_body_owners<rustc_interface::passes::run_required_analyses::{closure#1}::{closure#0}>::{closure#0}>
  21: rustc_interface::passes::analysis
      [... omitted 3 frames ...]
  22: <std::thread::local::LocalKey<core::cell::Cell<*const ()>>>::with::<rustc_middle::ty::context::tls::enter_context<<rustc_middle::ty::context::GlobalCtxt>::enter<rustc_interface::passes::create_and_enter_global_ctxt<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}, core::option::Option<rustc_interface::queries::Linker>>::{closure#1}, core::option::Option<rustc_interface::queries::Linker>>::{closure#0}, core::option::Option<rustc_interface::queries::Linker>>
  23: <rustc_middle::ty::context::TyCtxt>::create_global_ctxt::<core::option::Option<rustc_interface::queries::Linker>, rustc_interface::passes::create_and_enter_global_ctxt<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}>
  24: <rustc_interface::passes::create_and_enter_global_ctxt<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2} as core::ops::function::FnOnce<(&rustc_session::session::Session, rustc_middle::ty::context::CurrentGcx, alloc::sync::Arc<rustc_data_structures::jobserver::Proxy>, &std::sync::once_lock::OnceLock<rustc_middle::ty::context::GlobalCtxt>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_middle::arena::Arena>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_hir::Arena>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2})>>::call_once::{shim:vtable#0}
  25: <alloc::boxed::Box<dyn for<'a> core::ops::function::FnOnce<(&'a rustc_session::session::Session, rustc_middle::ty::context::CurrentGcx, alloc::sync::Arc<rustc_data_structures::jobserver::Proxy>, &'a std::sync::once_lock::OnceLock<rustc_middle::ty::context::GlobalCtxt<'a>>, &'a rustc_data_structures::sync::worker_local::WorkerLocal<rustc_middle::arena::Arena<'a>>, &'a rustc_data_structures::sync::worker_local::WorkerLocal<rustc_hir::Arena<'a>>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}), Output = core::option::Option<rustc_interface::queries::Linker>>> as core::ops::function::FnOnce<(&rustc_session::session::Session, rustc_middle::ty::context::CurrentGcx, alloc::sync::Arc<rustc_data_structures::jobserver::Proxy>, &std::sync::once_lock::OnceLock<rustc_middle::ty::context::GlobalCtxt>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_middle::arena::Arena>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_hir::Arena>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2})>>::call_once
  26: rustc_interface::passes::create_and_enter_global_ctxt::<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>
  27: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}::{closure#0}, ()>
  28: rustc_span::create_session_globals_then::<(), rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}::{closure#0}>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: please make sure that you have updated to the latest nightly

note: rustc 1.92.0-nightly (96438eed7 2025-10-20) running on aarch64-unknown-linux-gnu

note: compiler flags: -Z threads=1 -Z simulate-remapped-rust-src-base=/rustc/FAKE_PREFIX -Z translate-remapped-path-to-local-path=no -Z ignore-directory-in-diagnostics-source-blocks=/cargo -Z ignore-directory-in-diagnostics-source-blocks=/checkout/vendor -C codegen-units=1 -Z ui-testing -Z deduplicate-diagnostics=no -Z write-long-types-to-disk=no -C strip=debuginfo -C prefer-dynamic -C rpath -C debuginfo=0 -Z validate-mir

query stack during panic:
#0 [mir_drops_elaborated_and_const_checked] elaborating drops for `main::{closure#0}`
#1 [optimized_mir] optimizing MIR for `main::{closure#0}`
#2 [layout_of] computing layout of `{async block@/checkout/tests/ui/async-await/post-cleanup-phase-validation.rs:16:5: 16:10}`
#3 [mir_drops_elaborated_and_const_checked] elaborating drops for `main`
#4 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to 1 previous error
------------------------------------------

---
6    |
+    = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
7    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
8 
+ error[E0015]: cannot call non-const associated function `Box::<MaybeUninit<[i32; 3]>>::leak::<'_>` in constant functions
+   --> $DIR/bad_const_fn_body_ice.rs:2:5
+    |
+ LL |     vec![1, 2, 3]
+    |     ^^^^^^^^^^^^^
+    |
---
+    |
+    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+ help: add `#![feature(core_intrinsics)]` to the crate attributes to enable
+    |
+ LL + #![feature(core_intrinsics)]
+    |
+ 
+ error[E0015]: cannot call non-const function `vec_macro_slice_helper_unsafe::<i32, 3>` in constant functions
+   --> $DIR/bad_const_fn_body_ice.rs:2:5
+    |
---
-   --> /checkout/tests/ui/consts/min_const_fn/bad_const_fn_body_ice.rs:2:5
-   --> /checkout/tests/ui/consts/min_const_fn/bad_const_fn_body_ice.rs:2:5
+ error[E0015]: cannot call non-const associated function `Box::<[i32; 3]>::new_uninit` in constant functions
+    |     ^^^^^^^^^^^^^
+    = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
+ error[E0015]: cannot call non-const associated function `Box::<MaybeUninit<[i32; 3]>>::leak::<'_>` in constant functions
+   --> $DIR/bad_const_fn_body_ice.rs:2:5
+    |
+ LL |     vec![1, 2, 3]
+    |     ^^^^^^^^^^^^^
+    |
---
+    |
+    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+ help: add `#![feature(core_intrinsics)]` to the crate attributes to enable
+    |
+ LL + #![feature(core_intrinsics)]
+    |
+ 
+ error[E0015]: cannot call non-const function `vec_macro_slice_helper_unsafe::<i32, 3>` in constant functions
+   --> $DIR/bad_const_fn_body_ice.rs:2:5
+    |
---
To only update this specific test, also pass `--test-args consts/min_const_fn/bad_const_fn_body_ice.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/consts/min_const_fn/bad_const_fn_body_ice.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/consts/min_const_fn/bad_const_fn_body_ice" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0015]: cannot call non-const associated function `Box::<[i32; 3]>::new_uninit` in constant functions
##[error]  --> /checkout/tests/ui/consts/min_const_fn/bad_const_fn_body_ice.rs:2:5
   |
LL |     vec![1, 2, 3]
   |     ^^^^^^^^^^^^^
   |
   = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0015]: cannot call non-const associated function `Box::<MaybeUninit<[i32; 3]>>::leak::<'_>` in constant functions
##[error]  --> /checkout/tests/ui/consts/min_const_fn/bad_const_fn_body_ice.rs:2:5
   |
LL |     vec![1, 2, 3]
   |     ^^^^^^^^^^^^^
   |
---
-   --> $DIR/issue-105084.rs:38:14
+ error[E0425]: cannot find function `box_new` in module `std::boxed`
+   --> $DIR/issue-105084.rs:22:29
3    |
- LL |     let mut g = #[coroutine]
-    |         ----- move occurs because `g` has type `{coroutine@$DIR/issue-105084.rs:16:5: 16:7}`, which does not implement the `Copy` trait
- ...
- LL |     let mut h = copy(g);
-    |                      - value moved here
- ...
- LL |     Pin::new(&mut g).resume(());
-    |              ^^^^^^ value borrowed here after move
-    |
- note: consider changing this parameter type in function `copy` to borrow instead if owning the value isn't necessary
-   --> $DIR/issue-105084.rs:10:21
-    |
- LL | fn copy<T: Copy>(x: T) -> T {
-    |    ----             ^ this parameter takes ownership of the value
-    |    |
-    |    in this function
- help: consider cloning the value if the performance cost is acceptable
-    |
- LL |     let mut h = copy(g.clone());
-    |                       ++++++++
- 
- error[E0277]: the trait bound `Box<(i32, ())>: Copy` is not satisfied in `{coroutine@$DIR/issue-105084.rs:16:5: 16:7}`
-   --> $DIR/issue-105084.rs:32:17
-    |
- LL |     || {
-    |     -- within this `{coroutine@$DIR/issue-105084.rs:16:5: 16:7}`
- ...
- LL |     let mut h = copy(g);
-    |                 ^^^^^^^ within `{coroutine@$DIR/issue-105084.rs:16:5: 16:7}`, the trait `Copy` is not implemented for `Box<(i32, ())>`
-    |
- note: coroutine does not implement `Copy` as this value is used across a yield
-   --> $DIR/issue-105084.rs:22:41
-    |
37 LL |         let t = std::boxed::box_new((5, yield));
-    |                 ------------------------^^^^^--
-    |                 |                       |
-    |                 |                       yield occurs here, with `std::boxed::box_new((5, yield))` maybe used later
-    |                 has type `Box<(i32, ())>` which does not implement `Copy`
- note: required by a bound in `copy`
-   --> $DIR/issue-105084.rs:10:12
-    |
- LL | fn copy<T: Copy>(x: T) -> T {
-    |            ^^^^ required by this bound in `copy`
+    |                             ^^^^^^^ not found in `std::boxed`
47 
- error: aborting due to 2 previous errors
+ error: aborting due to 1 previous error
---
To only update this specific test, also pass `--test-args coroutine/issue-105084.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/coroutine/issue-105084.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/coroutine/issue-105084" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "--diagnostic-width=300"
stdout: none
--- stderr -------------------------------
error[E0425]: cannot find function `box_new` in module `std::boxed`
##[error]  --> /checkout/tests/ui/coroutine/issue-105084.rs:22:29
   |
LL |         let t = std::boxed::box_new((5, yield));
   |                             ^^^^^^^ not found in `std::boxed`

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0425`.
------------------------------------------

---- [ui] tests/ui/coroutine/issue-105084.rs stdout end ----
---- [ui] tests/ui/derives/nonsense-input-to-debug.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/derives/nonsense-input-to-debug/nonsense-input-to-debug.stderr`
diff of stderr:

4 LL |     should_be_vec_t: vec![T],
5    |                      ^^^^^^^
6 
- error: expected type, found `expr` metavariable
+ error: expected type, found keyword `unsafe`
8   --> $DIR/nonsense-input-to-debug.rs:7:22
9    |
10 LL |     should_be_vec_t: vec![T],


The actual stderr differed from the expected stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args derives/nonsense-input-to-debug.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/derives/nonsense-input-to-debug.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/derives/nonsense-input-to-debug" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error: `derive` cannot be used on items with type macros
##[error]  --> /checkout/tests/ui/derives/nonsense-input-to-debug.rs:7:22
   |
LL |     should_be_vec_t: vec![T],
   |                      ^^^^^^^

error: expected type, found keyword `unsafe`
##[error]  --> /checkout/tests/ui/derives/nonsense-input-to-debug.rs:7:22
   |
LL |     should_be_vec_t: vec![T],
   |                      ^^^^^^^
   |                      |
   |                      expected type
   |                      in this macro invocation
   |                      this macro call doesn't expand to a type
---
   |
LL | struct Nonsense<T> {
   |                 ^ unused type parameter
   |
   = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData`
   = help: if you intended `T` to be a const parameter, use `const T: /* Type */` instead

error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0392`.
------------------------------------------

---- [ui] tests/ui/derives/nonsense-input-to-debug.rs stdout end ----
---- [ui] tests/ui/drop/dynamic-drop-async.rs stdout ----

error: test compilation failed although it shouldn't!
status: exit status: 101
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/drop/dynamic-drop-async.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "-O" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/drop/dynamic-drop-async/a" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "--edition=2018"
stdout: none
--- stderr -------------------------------
##[error]error: internal compiler error: compiler/rustc_mir_transform/src/lower_intrinsics.rs:204:29: Only passing a local is supported
  --> /checkout/tests/ui/drop/dynamic-drop-async.rs:164:14
   |
LL |     let _x = vec![a.alloc().await, a.alloc().await, a.alloc().await, a.alloc().await];
   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: this error: internal compiler error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)


thread 'rustc' (67512) panicked at compiler/rustc_mir_transform/src/lower_intrinsics.rs:204:29:
Box<dyn Any>
stack backtrace:
   0: std::panicking::begin_panic::<rustc_errors::ExplicitBug>
   1: <rustc_errors::diagnostic::BugAbort as rustc_errors::diagnostic::EmissionGuarantee>::emit_producing_guarantee
   2: <rustc_errors::DiagCtxtHandle>::span_bug::<rustc_span::span_encoding::Span, alloc::string::String>
   3: rustc_middle::util::bug::opt_span_bug_fmt::<rustc_span::span_encoding::Span>::{closure#0}
   4: rustc_middle::ty::context::tls::with_opt::<rustc_middle::util::bug::opt_span_bug_fmt<rustc_span::span_encoding::Span>::{closure#0}, !>::{closure#0}
   5: rustc_middle::ty::context::tls::with_context_opt::<rustc_middle::ty::context::tls::with_opt<rustc_middle::util::bug::opt_span_bug_fmt<rustc_span::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
   6: rustc_middle::util::bug::span_bug_fmt::<rustc_span::span_encoding::Span>
   7: <rustc_mir_transform::lower_intrinsics::LowerIntrinsics as rustc_mir_transform::pass_manager::MirPass>::run_pass
---
      [... omitted 3 frames ...]
  12: <rustc_middle::ty::context::TyCtxt>::coroutine_layout
  13: rustc_ty_utils::layout::layout_of_uncached
  14: rustc_ty_utils::layout::layout_of
      [... omitted 3 frames ...]
  15: <rustc_mir_transform::known_panics_lint::KnownPanicsLint as rustc_mir_transform::pass_manager::MirLint>::run_lint
  16: rustc_mir_transform::pass_manager::run_passes_inner
  17: rustc_mir_transform::run_analysis_to_runtime_passes
  18: rustc_mir_transform::mir_drops_elaborated_and_const_checked
      [... omitted 3 frames ...]
  19: <rustc_middle::ty::context::TyCtxt>::par_hir_body_owners::<rustc_interface::passes::run_required_analyses::{closure#1}::{closure#0}>::{closure#0}
  20: rustc_data_structures::sync::parallel::par_for_each_in::<&rustc_span::def_id::LocalDefId, &[rustc_span::def_id::LocalDefId], <rustc_middle::ty::context::TyCtxt>::par_hir_body_owners<rustc_interface::passes::run_required_analyses::{closure#1}::{closure#0}>::{closure#0}>
  21: rustc_interface::passes::analysis
      [... omitted 3 frames ...]
  22: <std::thread::local::LocalKey<core::cell::Cell<*const ()>>>::with::<rustc_middle::ty::context::tls::enter_context<<rustc_middle::ty::context::GlobalCtxt>::enter<rustc_interface::passes::create_and_enter_global_ctxt<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}, core::option::Option<rustc_interface::queries::Linker>>::{closure#1}, core::option::Option<rustc_interface::queries::Linker>>::{closure#0}, core::option::Option<rustc_interface::queries::Linker>>
  23: <rustc_middle::ty::context::TyCtxt>::create_global_ctxt::<core::option::Option<rustc_interface::queries::Linker>, rustc_interface::passes::create_and_enter_global_ctxt<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}>
  24: <rustc_interface::passes::create_and_enter_global_ctxt<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2} as core::ops::function::FnOnce<(&rustc_session::session::Session, rustc_middle::ty::context::CurrentGcx, alloc::sync::Arc<rustc_data_structures::jobserver::Proxy>, &std::sync::once_lock::OnceLock<rustc_middle::ty::context::GlobalCtxt>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_middle::arena::Arena>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_hir::Arena>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2})>>::call_once::{shim:vtable#0}
  25: <alloc::boxed::Box<dyn for<'a> core::ops::function::FnOnce<(&'a rustc_session::session::Session, rustc_middle::ty::context::CurrentGcx, alloc::sync::Arc<rustc_data_structures::jobserver::Proxy>, &'a std::sync::once_lock::OnceLock<rustc_middle::ty::context::GlobalCtxt<'a>>, &'a rustc_data_structures::sync::worker_local::WorkerLocal<rustc_middle::arena::Arena<'a>>, &'a rustc_data_structures::sync::worker_local::WorkerLocal<rustc_hir::Arena<'a>>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}), Output = core::option::Option<rustc_interface::queries::Linker>>> as core::ops::function::FnOnce<(&rustc_session::session::Session, rustc_middle::ty::context::CurrentGcx, alloc::sync::Arc<rustc_data_structures::jobserver::Proxy>, &std::sync::once_lock::OnceLock<rustc_middle::ty::context::GlobalCtxt>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_middle::arena::Arena>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_hir::Arena>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2})>>::call_once
  26: rustc_interface::passes::create_and_enter_global_ctxt::<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>
  27: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}::{closure#0}, ()>
  28: rustc_span::create_session_globals_then::<(), rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}::{closure#0}>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: please make sure that you have updated to the latest nightly

note: rustc 1.92.0-nightly (96438eed7 2025-10-20) running on aarch64-unknown-linux-gnu

note: compiler flags: -Z threads=1 -Z simulate-remapped-rust-src-base=/rustc/FAKE_PREFIX -Z translate-remapped-path-to-local-path=no -Z ignore-directory-in-diagnostics-source-blocks=/cargo -Z ignore-directory-in-diagnostics-source-blocks=/checkout/vendor -C codegen-units=1 -Z ui-testing -Z deduplicate-diagnostics=no -Z write-long-types-to-disk=no -C strip=debuginfo -C prefer-dynamic -C rpath -C debuginfo=0

query stack during panic:
#0 [mir_drops_elaborated_and_const_checked] elaborating drops for `vec_simple::{closure#0}`
#1 [optimized_mir] optimizing MIR for `vec_simple::{closure#0}`
#2 [layout_of] computing layout of `{async fn body of vec_simple()}`
#3 [mir_drops_elaborated_and_const_checked] elaborating drops for `vec_simple`
#4 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to 1 previous error
------------------------------------------

---
- error[E0010]: allocations are not allowed in constants
+ error[E0015]: cannot call non-const associated function `Box::<[i32; 3]>::new_uninit` in constants
2   --> $DIR/E0010-teach.rs:5:23
3    |
4 LL | const CON: Vec<i32> = vec![1, 2, 3];

-    |                       ^^^^^^^^^^^^^ allocation not allowed in constants
+    |                       ^^^^^^^^^^^^^
6    |
-    = note: The runtime heap is not yet available at compile-time, so no runtime heap allocations can be created.
+    = note: calls in constants are limited to constant functions, tuple structs and tuple variants
8    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
9 
+ error[E0015]: cannot call non-const associated function `Box::<MaybeUninit<[i32; 3]>>::leak::<'_>` in constants
+   --> $DIR/E0010-teach.rs:5:23
+    |
+ LL | const CON: Vec<i32> = vec![1, 2, 3];
+    |                       ^^^^^^^^^^^^^
+    |
+    = note: calls in constants are limited to constant functions, tuple structs and tuple variants
+    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+ 
+ error: `write_via_move` is not yet stable as a const intrinsic
+   --> $DIR/E0010-teach.rs:5:23
+    |
+ LL | const CON: Vec<i32> = vec![1, 2, 3];
+    |                       ^^^^^^^^^^^^^
+    |
+    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+ help: add `#![feature(core_intrinsics)]` to the crate attributes to enable
+    |
+ LL + #![feature(core_intrinsics)]
+    |
+ 
+ error[E0015]: cannot call non-const function `vec_macro_slice_helper_unsafe::<i32, 3>` in constants
+   --> $DIR/E0010-teach.rs:5:23
+    |
+ LL | const CON: Vec<i32> = vec![1, 2, 3];
+    |                       ^^^^^^^^^^^^^
+    |
+    = note: calls in constants are limited to constant functions, tuple structs and tuple variants
+    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+ 
---
23 

Note: some mismatched output was normalized before being compared
-   --> /checkout/tests/ui/error-codes/E0010-teach.rs:5:23
- LL | const CON: Vec<i32> = vec![1, 2, 3]; //~ ERROR E0010
-   --> /checkout/tests/ui/error-codes/E0010-teach.rs:5:23
- LL | const CON: Vec<i32> = vec![1, 2, 3]; //~ ERROR E0010
-   --> /checkout/tests/ui/error-codes/E0010-teach.rs:5:23
- LL | const CON: Vec<i32> = vec![1, 2, 3]; //~ ERROR E0010
+ error[E0015]: cannot call non-const associated function `Box::<[i32; 3]>::new_uninit` in constants
+    |                       ^^^^^^^^^^^^^
+    = note: calls in constants are limited to constant functions, tuple structs and tuple variants
+ error[E0015]: cannot call non-const associated function `Box::<MaybeUninit<[i32; 3]>>::leak::<'_>` in constants
+   --> $DIR/E0010-teach.rs:5:23
+    |
+ LL | const CON: Vec<i32> = vec![1, 2, 3];
+    |                       ^^^^^^^^^^^^^
+    |
+    = note: calls in constants are limited to constant functions, tuple structs and tuple variants
+    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+ 
+ error: `write_via_move` is not yet stable as a const intrinsic
+   --> $DIR/E0010-teach.rs:5:23
+    |
+ LL | const CON: Vec<i32> = vec![1, 2, 3];
+    |                       ^^^^^^^^^^^^^
+    |
+    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+ help: add `#![feature(core_intrinsics)]` to the crate attributes to enable
+    |
+ LL + #![feature(core_intrinsics)]
+    |
+ 
+ error[E0015]: cannot call non-const function `vec_macro_slice_helper_unsafe::<i32, 3>` in constants
+   --> $DIR/E0010-teach.rs:5:23
+    |
+ LL | const CON: Vec<i32> = vec![1, 2, 3];
+    |                       ^^^^^^^^^^^^^
+    |
+    = note: calls in constants are limited to constant functions, tuple structs and tuple variants
+    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+ 
---
To only update this specific test, also pass `--test-args error-codes/E0010-teach.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/error-codes/E0010-teach.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/error-codes/E0010-teach" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Z" "teach"
stdout: none
--- stderr -------------------------------
error[E0015]: cannot call non-const associated function `Box::<[i32; 3]>::new_uninit` in constants
##[error]  --> /checkout/tests/ui/error-codes/E0010-teach.rs:5:23
   |
LL | const CON: Vec<i32> = vec![1, 2, 3]; //~ ERROR E0010
   |                       ^^^^^^^^^^^^^
   |
   = note: calls in constants are limited to constant functions, tuple structs and tuple variants
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0015]: cannot call non-const associated function `Box::<MaybeUninit<[i32; 3]>>::leak::<'_>` in constants
##[error]  --> /checkout/tests/ui/error-codes/E0010-teach.rs:5:23
   |
LL | const CON: Vec<i32> = vec![1, 2, 3]; //~ ERROR E0010
   |                       ^^^^^^^^^^^^^
   |
   = note: calls in constants are limited to constant functions, tuple structs and tuple variants
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error: `write_via_move` is not yet stable as a const intrinsic
##[error]  --> /checkout/tests/ui/error-codes/E0010-teach.rs:5:23
   |
LL | const CON: Vec<i32> = vec![1, 2, 3]; //~ ERROR E0010
   |                       ^^^^^^^^^^^^^
   |
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
help: add `#![feature(core_intrinsics)]` to the crate attributes to enable
   |
LL + #![feature(core_intrinsics)]
   |

error[E0015]: cannot call non-const function `vec_macro_slice_helper_unsafe::<i32, 3>` in constants
##[error]  --> /checkout/tests/ui/error-codes/E0010-teach.rs:5:23
   |
LL | const CON: Vec<i32> = vec![1, 2, 3]; //~ ERROR E0010
   |                       ^^^^^^^^^^^^^
   |
   = note: calls in constants are limited to constant functions, tuple structs and tuple variants
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0015]: cannot call non-const method `slice::<impl [i32]>::into_vec::<std::alloc::Global>` in constants
##[error]  --> /checkout/tests/ui/error-codes/E0010-teach.rs:5:23
   |
LL | const CON: Vec<i32> = vec![1, 2, 3]; //~ ERROR E0010
   |                       ^^^^^^^^^^^^^
   |
   = note: calls in constants are limited to constant functions, tuple structs and tuple variants
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

---
- error[E0010]: allocations are not allowed in constants
+ error[E0015]: cannot call non-const associated function `Box::<[i32; 3]>::new_uninit` in constants
2   --> $DIR/E0010.rs:3:23
3    |
4 LL | const CON: Vec<i32> = vec![1, 2, 3];

-    |                       ^^^^^^^^^^^^^ allocation not allowed in constants
+    |                       ^^^^^^^^^^^^^
6    |
+    = note: calls in constants are limited to constant functions, tuple structs and tuple variants
7    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
8 
+ error[E0015]: cannot call non-const associated function `Box::<MaybeUninit<[i32; 3]>>::leak::<'_>` in constants
+   --> $DIR/E0010.rs:3:23
+    |
+ LL | const CON: Vec<i32> = vec![1, 2, 3];
+    |                       ^^^^^^^^^^^^^
+    |
+    = note: calls in constants are limited to constant functions, tuple structs and tuple variants
+    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+ 
+ error: `write_via_move` is not yet stable as a const intrinsic
+   --> $DIR/E0010.rs:3:23
+    |
+ LL | const CON: Vec<i32> = vec![1, 2, 3];
+    |                       ^^^^^^^^^^^^^
+    |
+    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+ help: add `#![feature(core_intrinsics)]` to the crate attributes to enable
+    |
+ LL + #![feature(core_intrinsics)]
+    |
+ 
+ error[E0015]: cannot call non-const function `vec_macro_slice_helper_unsafe::<i32, 3>` in constants
+   --> $DIR/E0010.rs:3:23
+    |
+ LL | const CON: Vec<i32> = vec![1, 2, 3];
+    |                       ^^^^^^^^^^^^^
+    |
+    = note: calls in constants are limited to constant functions, tuple structs and tuple variants
+    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+ 
---
22 

Note: some mismatched output was normalized before being compared
-   --> /checkout/tests/ui/error-codes/E0010.rs:3:23
- LL | const CON: Vec<i32> = vec![1, 2, 3]; //~ ERROR E0010
-   --> /checkout/tests/ui/error-codes/E0010.rs:3:23
- LL | const CON: Vec<i32> = vec![1, 2, 3]; //~ ERROR E0010
-   --> /checkout/tests/ui/error-codes/E0010.rs:3:23
- LL | const CON: Vec<i32> = vec![1, 2, 3]; //~ ERROR E0010
+ error[E0015]: cannot call non-const associated function `Box::<[i32; 3]>::new_uninit` in constants
+    |                       ^^^^^^^^^^^^^
+    = note: calls in constants are limited to constant functions, tuple structs and tuple variants
+ error[E0015]: cannot call non-const associated function `Box::<MaybeUninit<[i32; 3]>>::leak::<'_>` in constants
+   --> $DIR/E0010.rs:3:23
+    |
+ LL | const CON: Vec<i32> = vec![1, 2, 3];
+    |                       ^^^^^^^^^^^^^
+    |
+    = note: calls in constants are limited to constant functions, tuple structs and tuple variants
+    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+ 
+ error: `write_via_move` is not yet stable as a const intrinsic
+   --> $DIR/E0010.rs:3:23
+    |
+ LL | const CON: Vec<i32> = vec![1, 2, 3];
+    |                       ^^^^^^^^^^^^^
+    |
+    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+ help: add `#![feature(core_intrinsics)]` to the crate attributes to enable
+    |
+ LL + #![feature(core_intrinsics)]
+    |
+ 
+ error[E0015]: cannot call non-const function `vec_macro_slice_helper_unsafe::<i32, 3>` in constants
+   --> $DIR/E0010.rs:3:23
+    |
+ LL | const CON: Vec<i32> = vec![1, 2, 3];
+    |                       ^^^^^^^^^^^^^
+    |
+    = note: calls in constants are limited to constant functions, tuple structs and tuple variants
+    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+ 
---
To only update this specific test, also pass `--test-args error-codes/E0010.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/error-codes/E0010.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/error-codes/E0010" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0015]: cannot call non-const associated function `Box::<[i32; 3]>::new_uninit` in constants
##[error]  --> /checkout/tests/ui/error-codes/E0010.rs:3:23
   |
LL | const CON: Vec<i32> = vec![1, 2, 3]; //~ ERROR E0010
   |                       ^^^^^^^^^^^^^
   |
   = note: calls in constants are limited to constant functions, tuple structs and tuple variants
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0015]: cannot call non-const associated function `Box::<MaybeUninit<[i32; 3]>>::leak::<'_>` in constants
##[error]  --> /checkout/tests/ui/error-codes/E0010.rs:3:23
   |
LL | const CON: Vec<i32> = vec![1, 2, 3]; //~ ERROR E0010
   |                       ^^^^^^^^^^^^^
   |
   = note: calls in constants are limited to constant functions, tuple structs and tuple variants
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error: `write_via_move` is not yet stable as a const intrinsic
##[error]  --> /checkout/tests/ui/error-codes/E0010.rs:3:23
   |
LL | const CON: Vec<i32> = vec![1, 2, 3]; //~ ERROR E0010
   |                       ^^^^^^^^^^^^^
   |
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
help: add `#![feature(core_intrinsics)]` to the crate attributes to enable
   |
LL + #![feature(core_intrinsics)]
   |

error[E0015]: cannot call non-const function `vec_macro_slice_helper_unsafe::<i32, 3>` in constants
##[error]  --> /checkout/tests/ui/error-codes/E0010.rs:3:23
   |
LL | const CON: Vec<i32> = vec![1, 2, 3]; //~ ERROR E0010
   |                       ^^^^^^^^^^^^^
   |
   = note: calls in constants are limited to constant functions, tuple structs and tuple variants
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0015]: cannot call non-const method `slice::<impl [i32]>::into_vec::<std::alloc::Global>` in constants
##[error]  --> /checkout/tests/ui/error-codes/E0010.rs:3:23
   |
LL | const CON: Vec<i32> = vec![1, 2, 3]; //~ ERROR E0010
   |                       ^^^^^^^^^^^^^
   |
   = note: calls in constants are limited to constant functions, tuple structs and tuple variants
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

---
11    |
12    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
- help: consider consuming the `Vec<i32>` when turning it into an `Iterator`
-    |
- LL |     let mut x = vec![1].into_iter();
-    |                          +++++
17 help: consider using a `let` binding to create a longer lived value
18    |
19 LL ~     let binding = vec![1];


The actual stderr differed from the expected stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args lifetimes/borrowck-let-suggestion.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/lifetimes/borrowck-let-suggestion.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/lifetimes/borrowck-let-suggestion" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0716]: temporary value dropped while borrowed
##[error]  --> /checkout/tests/ui/lifetimes/borrowck-let-suggestion.rs:2:17
   |
LL |     let mut x = vec![1].iter();
   |                 ^^^^^^^       - temporary value is freed at the end of this statement
   |                 |
   |                 creates a temporary value which is freed while still in use
LL |     //~^ ERROR temporary value dropped while borrowed
LL |     x.use_mut();
   |     - borrow later used here
   |
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider using a `let` binding to create a longer lived value
   |
LL ~     let binding = vec![1];
LL ~     let mut x = binding.iter();
   |

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0716`.
------------------------------------------

---- [ui] tests/ui/lifetimes/borrowck-let-suggestion.rs stdout end ----
---- [ui] tests/ui/limits/issue-17913.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/limits/issue-17913/issue-17913.stderr`
diff of stderr:

- error: values of the type `[&usize; usize::MAX]` are too big for the target architecture
+ error[E0080]: values of the type `[&usize; usize::MAX]` are too big for the target architecture
+   --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
+    |
+    = note: evaluation of `<[&usize; usize::MAX] as std::mem::SizedTypeProperties>::IS_ZST` failed inside this call
+ note: inside `std::mem::size_of::<[&usize; usize::MAX]>`
+   --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
+ 
+ error[E0080]: values of the type `[&usize; usize::MAX]` are too big for the target architecture
+   --> $SRC_DIR/core/src/ptr/alignment.rs:LL:COL
+    |
+    = note: evaluation of `std::ptr::Alignment::of::<std::mem::MaybeUninit<[&usize; usize::MAX]>>::{constant#0}` failed inside this call
+ note: inside `std::mem::align_of::<MaybeUninit<[&usize; usize::MAX]>>`
+   --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
+ 
+ note: the above error was encountered while instantiating `fn Box::<[&usize; usize::MAX]>::try_new_uninit_in`
2   --> $SRC_DIR/alloc/src/boxed.rs:LL:COL
3 
- error: aborting due to 1 previous error
+ error: aborting due to 2 previous errors
5 
+ For more information about this error, try `rustc --explain E0080`.
6 

Note: some mismatched output was normalized before being compared
- error[E0080]: values of the type `[&usize; 17293822569102704640]` are too big for the target architecture
-   --> /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1266:26
-    = note: evaluation of `<[&usize; 17293822569102704640] as std::mem::SizedTypeProperties>::IS_ZST` failed inside this call
- note: inside `std::mem::size_of::<[&usize; 17293822569102704640]>`
-   --> /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:336:5
- error[E0080]: values of the type `[&usize; 17293822569102704640]` are too big for the target architecture
-   --> /rustc/FAKE_PREFIX/library/core/src/ptr/alignment.rs:50:32
-    = note: evaluation of `std::ptr::Alignment::of::<std::mem::MaybeUninit<[&usize; 17293822569102704640]>>::{constant#0}` failed inside this call
- note: inside `std::mem::align_of::<MaybeUninit<[&usize; 17293822569102704640]>>`
-   --> /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:491:5
- note: the above error was encountered while instantiating `fn Box::<[&usize; 17293822569102704640]>::try_new_uninit_in`
-   --> /rustc/FAKE_PREFIX/library/alloc/src/boxed.rs:477:15
+ error[E0080]: values of the type `[&usize; usize::MAX]` are too big for the target architecture
+   --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
+    |
+    = note: evaluation of `<[&usize; usize::MAX] as std::mem::SizedTypeProperties>::IS_ZST` failed inside this call
+ note: inside `std::mem::size_of::<[&usize; usize::MAX]>`
+   --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
+ 
+ error[E0080]: values of the type `[&usize; usize::MAX]` are too big for the target architecture
+   --> $SRC_DIR/core/src/ptr/alignment.rs:LL:COL
+    |
+    = note: evaluation of `std::ptr::Alignment::of::<std::mem::MaybeUninit<[&usize; usize::MAX]>>::{constant#0}` failed inside this call
+ note: inside `std::mem::align_of::<MaybeUninit<[&usize; usize::MAX]>>`
+   --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
+ 
+ note: the above error was encountered while instantiating `fn Box::<[&usize; usize::MAX]>::try_new_uninit_in`
+ error: aborting due to 2 previous errors
+ For more information about this error, try `rustc --explain E0080`.


The actual stderr differed from the expected stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args limits/issue-17913.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/limits/issue-17913.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/limits/issue-17913" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0080]: values of the type `[&usize; 17293822569102704640]` are too big for the target architecture
##[error]  --> /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1266:26
   |
   = note: evaluation of `<[&usize; 17293822569102704640] as std::mem::SizedTypeProperties>::IS_ZST` failed inside this call
note: inside `std::mem::size_of::<[&usize; 17293822569102704640]>`
  --> /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:336:5

error[E0080]: values of the type `[&usize; 17293822569102704640]` are too big for the target architecture
##[error]  --> /rustc/FAKE_PREFIX/library/core/src/ptr/alignment.rs:50:32
   |
   = note: evaluation of `std::ptr::Alignment::of::<std::mem::MaybeUninit<[&usize; 17293822569102704640]>>::{constant#0}` failed inside this call
note: inside `std::mem::align_of::<MaybeUninit<[&usize; 17293822569102704640]>>`
  --> /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:491:5

note: the above error was encountered while instantiating `fn Box::<[&usize; 17293822569102704640]>::try_new_uninit_in`
  --> /rustc/FAKE_PREFIX/library/alloc/src/boxed.rs:477:15

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0080`.
------------------------------------------

---- [ui] tests/ui/limits/issue-17913.rs stdout end ----
---- [ui] tests/ui/macros/vec-macro-in-pattern.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/macros/vec-macro-in-pattern/vec-macro-in-pattern.stderr`
diff of stderr:

+  WARN rustc_errors::emitter Invalid span $SRC_DIR/alloc/src/macros.rs:LL:COL (#5), error=SourceNotAvailable { filename: Real(Remapped { local_path: None, virtual_name: "$SRC_DIR/alloc/src/macros.rs" }) }
+ error: expected identifier, found keyword `unsafe`
+   --> $DIR/vec-macro-in-pattern.rs:7:14
+    |
+ LL |         Some(vec![43]) => {}
+    |              ^^^^^^^^ expected identifier, found keyword
+    |
---
33 For more information about an error, try `rustc --explain E0164`.
34 

Note: some mismatched output was normalized before being compared
-  WARN rustc_errors::emitter Invalid span /rustc/FAKE_PREFIX/library/alloc/src/macros.rs:59:17: 59:17 (#5), error=SourceNotAvailable { filename: Real(Remapped { local_path: None, virtual_name: "/rustc/FAKE_PREFIX/library/alloc/src/macros.rs" }) }
-   --> /checkout/tests/ui/macros/vec-macro-in-pattern.rs:7:14
- LL |         Some(vec![43]) => {} //~ ERROR expected a pattern, found a function call
-   --> /checkout/tests/ui/macros/vec-macro-in-pattern.rs:7:14
- LL |         Some(vec![43]) => {} //~ ERROR expected a pattern, found a function call
-   --> /checkout/tests/ui/macros/vec-macro-in-pattern.rs:7:14
- LL |         Some(vec![43]) => {} //~ ERROR expected a pattern, found a function call
-   --> /checkout/tests/ui/macros/vec-macro-in-pattern.rs:7:14
- LL |         Some(vec![43]) => {} //~ ERROR expected a pattern, found a function call
-   --> /checkout/tests/ui/macros/vec-macro-in-pattern.rs:7:14
- LL |         Some(vec![43]) => {} //~ ERROR expected a pattern, found a function call
+  WARN rustc_errors::emitter Invalid span $SRC_DIR/alloc/src/macros.rs:LL:COL (#5), error=SourceNotAvailable { filename: Real(Remapped { local_path: None, virtual_name: "$SRC_DIR/alloc/src/macros.rs" }) }
+ error: expected identifier, found keyword `unsafe`
+   --> $DIR/vec-macro-in-pattern.rs:7:14
+    |
+ LL |         Some(vec![43]) => {}
+    |              ^^^^^^^^ expected identifier, found keyword
+    |
---
To only update this specific test, also pass `--test-args macros/vec-macro-in-pattern.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/macros/vec-macro-in-pattern.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/macros/vec-macro-in-pattern" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
 WARN rustc_errors::emitter Invalid span /rustc/FAKE_PREFIX/library/alloc/src/macros.rs:59:17: 59:17 (#5), error=SourceNotAvailable { filename: Real(Remapped { local_path: None, virtual_name: "/rustc/FAKE_PREFIX/library/alloc/src/macros.rs" }) }
error: expected identifier, found keyword `unsafe`
##[error]  --> /checkout/tests/ui/macros/vec-macro-in-pattern.rs:7:14
   |
LL |         Some(vec![43]) => {} //~ ERROR expected a pattern, found a function call
   |              ^^^^^^^^ expected identifier, found keyword
   |
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error: expected identifier, found reserved identifier `$crate`
##[error]  --> /checkout/tests/ui/macros/vec-macro-in-pattern.rs:7:14
   |
LL |         Some(vec![43]) => {} //~ ERROR expected a pattern, found a function call
   |              ^^^^^^^^ expected identifier, found reserved identifier
   |
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error: expected `,`
##[error]  --> /checkout/tests/ui/macros/vec-macro-in-pattern.rs:7:14
   |
LL |         Some(vec![43]) => {} //~ ERROR expected a pattern, found a function call
   |              ^^^^^^^^ while parsing the fields for this pattern
   |
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0532]: expected a pattern, found a function call
##[error]  --> /checkout/tests/ui/macros/vec-macro-in-pattern.rs:7:14
   |
LL |         Some(vec![43]) => {} //~ ERROR expected a pattern, found a function call
   |              ^^^^^^^^ not a tuple struct or tuple variant
   |
   = note: function calls are not allowed in patterns: <https://doc.rust-lang.org/book/ch19-00-patterns.html>
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0532]: expected a pattern, found a function call
##[error]  --> /checkout/tests/ui/macros/vec-macro-in-pattern.rs:7:14
   |
LL |         Some(vec![43]) => {} //~ ERROR expected a pattern, found a function call
   |              ^^^^^^^^ not a tuple struct or tuple variant
   |
   = note: function calls are not allowed in patterns: <https://doc.rust-lang.org/book/ch19-00-patterns.html>
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0422]: cannot find struct, variant or union type `r#unsafe` in this scope
##[error]  --> /checkout/tests/ui/macros/vec-macro-in-pattern.rs:7:14
   |
LL |         Some(vec![43]) => {} //~ ERROR expected a pattern, found a function call
   |              ^^^^^^^^ not found in this scope
   |
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0658]: usage of qualified paths in this context is experimental
##[error]  --> /checkout/tests/ui/macros/vec-macro-in-pattern.rs:7:14
   |
LL |         Some(vec![43]) => {} //~ ERROR expected a pattern, found a function call
   |              ^^^^^^^^
   |
   = note: see issue #86935 <https://github.com/rust-lang/rust/issues/86935> for more information
   = help: add `#![feature(more_qualified_paths)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0164]: expected tuple struct or tuple variant, found associated function `<[_]>::into_vec`
##[error]  --> /checkout/tests/ui/macros/vec-macro-in-pattern.rs:7:14
   |
LL |         Some(vec![43]) => {} //~ ERROR expected a pattern, found a function call
   |              ^^^^^^^^ `fn` calls are not allowed in patterns
   |
   = help: for more information, visit https://doc.rust-lang.org/book/ch19-00-patterns.html
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 8 previous errors
---
11 LL |   };
12    |   - value is dropped here
13 
- error[E0010]: allocations are not allowed in statics
+ error[E0015]: cannot call non-const associated function `Box::<[MyOwned; 1]>::new_uninit` in statics
15   --> $DIR/check-values-constraints.rs:81:33
16    |
17 LL | static STATIC11: Vec<MyOwned> = vec![MyOwned];

-    |                                 ^^^^^^^^^^^^^ allocation not allowed in statics
+    |                                 ^^^^^^^^^^^^^
19    |
+    = note: calls in statics are limited to constant functions, tuple structs and tuple variants
+    = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
20    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
21 
+ error[E0015]: cannot call non-const associated function `Box::<MaybeUninit<[MyOwned; 1]>>::leak::<'_>` in statics
+   --> $DIR/check-values-constraints.rs:81:33
+    |
+ LL | static STATIC11: Vec<MyOwned> = vec![MyOwned];
+    |                                 ^^^^^^^^^^^^^
+    |
+    = note: calls in statics are limited to constant functions, tuple structs and tuple variants
+    = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
+    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+ 
+ error: `write_via_move` is not yet stable as a const intrinsic
+   --> $DIR/check-values-constraints.rs:81:33
+    |
+ LL | static STATIC11: Vec<MyOwned> = vec![MyOwned];
+    |                                 ^^^^^^^^^^^^^
+    |
+    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+ help: add `#![feature(core_intrinsics)]` to the crate attributes to enable
+    |
+ LL + #![feature(core_intrinsics)]
+    |
+ 
+ error[E0015]: cannot call non-const function `vec_macro_slice_helper_unsafe::<MyOwned, 1>` in statics
+   --> $DIR/check-values-constraints.rs:81:33
+    |
+ LL | static STATIC11: Vec<MyOwned> = vec![MyOwned];
+    |                                 ^^^^^^^^^^^^^
+    |
+    = note: calls in statics are limited to constant functions, tuple structs and tuple variants
+    = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
+    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+ 
22 error[E0015]: cannot call non-const method `slice::<impl [MyOwned]>::into_vec::<std::alloc::Global>` in statics
23   --> $DIR/check-values-constraints.rs:81:33
24    |

38    = note: calls in statics are limited to constant functions, tuple structs and tuple variants
39    = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
40 
- error[E0010]: allocations are not allowed in statics
+ error[E0015]: cannot call non-const associated function `Box::<[MyOwned; 1]>::new_uninit` in statics
42   --> $DIR/check-values-constraints.rs:96:5
43    |
44 LL |     vec![MyOwned],

-    |     ^^^^^^^^^^^^^ allocation not allowed in statics
+    |     ^^^^^^^^^^^^^
46    |
+    = note: calls in statics are limited to constant functions, tuple structs and tuple variants
+    = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
47    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
48 
+ error[E0015]: cannot call non-const associated function `Box::<MaybeUninit<[MyOwned; 1]>>::leak::<'_>` in statics
+   --> $DIR/check-values-constraints.rs:96:5
+    |
+ LL |     vec![MyOwned],
+    |     ^^^^^^^^^^^^^
+    |
+    = note: calls in statics are limited to constant functions, tuple structs and tuple variants
+    = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
+    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+ 
+ error: `write_via_move` is not yet stable as a const intrinsic
+   --> $DIR/check-values-constraints.rs:96:5
+    |
+ LL |     vec![MyOwned],
+    |     ^^^^^^^^^^^^^
+    |
+    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+ help: add `#![feature(core_intrinsics)]` to the crate attributes to enable
+    |
+ LL + #![feature(core_intrinsics)]
+    |
+ 
+ error[E0015]: cannot call non-const function `vec_macro_slice_helper_unsafe::<MyOwned, 1>` in statics
+   --> $DIR/check-values-constraints.rs:96:5
+    |
+ LL |     vec![MyOwned],
+    |     ^^^^^^^^^^^^^
+    |
+    = note: calls in statics are limited to constant functions, tuple structs and tuple variants
+    = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
+    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+ 
49 error[E0015]: cannot call non-const method `slice::<impl [MyOwned]>::into_vec::<std::alloc::Global>` in statics
50   --> $DIR/check-values-constraints.rs:96:5
51    |

56    = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
57    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
58 
- error[E0010]: allocations are not allowed in statics
+ error[E0015]: cannot call non-const associated function `Box::<[MyOwned; 1]>::new_uninit` in statics
60   --> $DIR/check-values-constraints.rs:98:5
61    |
62 LL |     vec![MyOwned],

-    |     ^^^^^^^^^^^^^ allocation not allowed in statics
+    |     ^^^^^^^^^^^^^
64    |
+    = note: calls in statics are limited to constant functions, tuple structs and tuple variants
+    = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
65    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
66 
+ error[E0015]: cannot call non-const associated function `Box::<MaybeUninit<[MyOwned; 1]>>::leak::<'_>` in statics
+   --> $DIR/check-values-constraints.rs:98:5
+    |
+ LL |     vec![MyOwned],
+    |     ^^^^^^^^^^^^^
+    |
+    = note: calls in statics are limited to constant functions, tuple structs and tuple variants
+    = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
+    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+ 
+ error: `write_via_move` is not yet stable as a const intrinsic
+   --> $DIR/check-values-constraints.rs:98:5
+    |
+ LL |     vec![MyOwned],
+    |     ^^^^^^^^^^^^^
+    |
+    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+ help: add `#![feature(core_intrinsics)]` to the crate attributes to enable
+    |
+ LL + #![feature(core_intrinsics)]
+    |
+ 
+ error[E0015]: cannot call non-const function `vec_macro_slice_helper_unsafe::<MyOwned, 1>` in statics
+   --> $DIR/check-values-constraints.rs:98:5
+    |
+ LL |     vec![MyOwned],
+    |     ^^^^^^^^^^^^^
+    |
+    = note: calls in statics are limited to constant functions, tuple structs and tuple variants
+    = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
+    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+ 
67 error[E0015]: cannot call non-const method `slice::<impl [MyOwned]>::into_vec::<std::alloc::Global>` in statics
68   --> $DIR/check-values-constraints.rs:98:5
69    |

74    = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
75    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
76 
- error[E0010]: allocations are not allowed in statics
+ error[E0015]: cannot call non-const associated function `Box::<[MyOwned; 1]>::new_uninit` in statics
78   --> $DIR/check-values-constraints.rs:103:6
79    |
80 LL |     &vec![MyOwned],

-    |      ^^^^^^^^^^^^^ allocation not allowed in statics
+    |      ^^^^^^^^^^^^^
82    |
+    = note: calls in statics are limited to constant functions, tuple structs and tuple variants
+    = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
83    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
84 
+ error[E0015]: cannot call non-const associated function `Box::<MaybeUninit<[MyOwned; 1]>>::leak::<'_>` in statics
+   --> $DIR/check-values-constraints.rs:103:6
+    |
+ LL |     &vec![MyOwned],
+    |      ^^^^^^^^^^^^^
+    |
+    = note: calls in statics are limited to constant functions, tuple structs and tuple variants
+    = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
+    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+ 
+ error: `write_via_move` is not yet stable as a const intrinsic
+   --> $DIR/check-values-constraints.rs:103:6
+    |
+ LL |     &vec![MyOwned],
+    |      ^^^^^^^^^^^^^
+    |
+    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+ help: add `#![feature(core_intrinsics)]` to the crate attributes to enable
+    |
+ LL + #![feature(core_intrinsics)]
+    |
+ 
+ error[E0015]: cannot call non-const function `vec_macro_slice_helper_unsafe::<MyOwned, 1>` in statics
+   --> $DIR/check-values-constraints.rs:103:6
+    |
+ LL |     &vec![MyOwned],
+    |      ^^^^^^^^^^^^^
+    |
+    = note: calls in statics are limited to constant functions, tuple structs and tuple variants
+    = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
+    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+ 
85 error[E0015]: cannot call non-const method `slice::<impl [MyOwned]>::into_vec::<std::alloc::Global>` in statics
86   --> $DIR/check-values-constraints.rs:103:6
87    |

92    = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
93    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
94 
- error[E0010]: allocations are not allowed in statics
+ error[E0015]: cannot call non-const associated function `Box::<[MyOwned; 1]>::new_uninit` in statics
96   --> $DIR/check-values-constraints.rs:105:6
97    |
98 LL |     &vec![MyOwned],

-    |      ^^^^^^^^^^^^^ allocation not allowed in statics
+    |      ^^^^^^^^^^^^^
100    |
+    = note: calls in statics are limited to constant functions, tuple structs and tuple variants
+    = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
101    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
102 
+ error[E0015]: cannot call non-const associated function `Box::<MaybeUninit<[MyOwned; 1]>>::leak::<'_>` in statics
+   --> $DIR/check-values-constraints.rs:105:6
+    |
+ LL |     &vec![MyOwned],
+    |      ^^^^^^^^^^^^^
+    |
+    = note: calls in statics are limited to constant functions, tuple structs and tuple variants
+    = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
+    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+ 
+ error: `write_via_move` is not yet stable as a const intrinsic
+   --> $DIR/check-values-constraints.rs:105:6
+    |
+ LL |     &vec![MyOwned],
+    |      ^^^^^^^^^^^^^
+    |
+    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+ help: add `#![feature(core_intrinsics)]` to the crate attributes to enable
+    |
+ LL + #![feature(core_intrinsics)]
+    |
+ 
+ error[E0015]: cannot call non-const function `vec_macro_slice_helper_unsafe::<MyOwned, 1>` in statics
+   --> $DIR/check-values-constraints.rs:105:6
+    |
+ LL |     &vec![MyOwned],
+    |      ^^^^^^^^^^^^^
+    |
+    = note: calls in statics are limited to constant functions, tuple structs and tuple variants
+    = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
+    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+ 
103 error[E0015]: cannot call non-const method `slice::<impl [MyOwned]>::into_vec::<std::alloc::Global>` in statics
104   --> $DIR/check-values-constraints.rs:105:6
105    |

110    = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
111    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
112 
- error[E0010]: allocations are not allowed in statics
+ error[E0015]: cannot call non-const associated function `Box::<[isize; 1]>::new_uninit` in statics
114   --> $DIR/check-values-constraints.rs:111:31
115    |
116 LL | static STATIC19: Vec<isize> = vec![3];

-    |                               ^^^^^^^ allocation not allowed in statics
+    |                               ^^^^^^^
118    |
+    = note: calls in statics are limited to constant functions, tuple structs and tuple variants
+    = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
119    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
120 
+ error[E0015]: cannot call non-const associated function `Box::<MaybeUninit<[isize; 1]>>::leak::<'_>` in statics
+   --> $DIR/check-values-constraints.rs:111:31
+    |
+ LL | static STATIC19: Vec<isize> = vec![3];
+    |                               ^^^^^^^
+    |
+    = note: calls in statics are limited to constant functions, tuple structs and tuple variants
+    = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
+    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+ 
+ error: `write_via_move` is not yet stable as a const intrinsic
+   --> $DIR/check-values-constraints.rs:111:31
+    |
+ LL | static STATIC19: Vec<isize> = vec![3];
+    |                               ^^^^^^^
+    |
+    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+ help: add `#![feature(core_intrinsics)]` to the crate attributes to enable
+    |
+ LL + #![feature(core_intrinsics)]
+    |
+ 
+ error[E0015]: cannot call non-const function `vec_macro_slice_helper_unsafe::<isize, 1>` in statics
+   --> $DIR/check-values-constraints.rs:111:31
+    |
+ LL | static STATIC19: Vec<isize> = vec![3];
+    |                               ^^^^^^^
+    |
+    = note: calls in statics are limited to constant functions, tuple structs and tuple variants
+    = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
+    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+ 
121 error[E0015]: cannot call non-const method `slice::<impl [isize]>::into_vec::<std::alloc::Global>` in statics
122   --> $DIR/check-values-constraints.rs:111:31
123    |

128    = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
129    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
130 
- error[E0010]: allocations are not allowed in statics
+ error[E0015]: cannot call non-const associated function `Box::<[isize; 1]>::new_uninit` in statics
132   --> $DIR/check-values-constraints.rs:117:32
133    |
134 LL |         static x: Vec<isize> = vec![3];

-    |                                ^^^^^^^ allocation not allowed in statics
+    |                                ^^^^^^^
136    |
+    = note: calls in statics are limited to constant functions, tuple structs and tuple variants
+    = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
137    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
138 
+ error[E0015]: cannot call non-const associated function `Box::<MaybeUninit<[isize; 1]>>::leak::<'_>` in statics
+   --> $DIR/check-values-constraints.rs:117:32
+    |
+ LL |         static x: Vec<isize> = vec![3];
+    |                                ^^^^^^^
+    |
+    = note: calls in statics are limited to constant functions, tuple structs and tuple variants
+    = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
+    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+ 
+ error: `write_via_move` is not yet stable as a const intrinsic
+   --> $DIR/check-values-constraints.rs:117:32
+    |
+ LL |         static x: Vec<isize> = vec![3];
+    |                                ^^^^^^^
+    |
+    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+ help: add `#![feature(core_intrinsics)]` to the crate attributes to enable
+    |
+ LL + #![feature(core_intrinsics)]
+    |
+ 
+ error[E0015]: cannot call non-const function `vec_macro_slice_helper_unsafe::<isize, 1>` in statics
+   --> $DIR/check-values-constraints.rs:117:32
+    |
+ LL |         static x: Vec<isize> = vec![3];
+    |                                ^^^^^^^
+    |
+    = note: calls in statics are limited to constant functions, tuple structs and tuple variants
+    = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
+    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+ 
139 error[E0015]: cannot call non-const method `slice::<impl [isize]>::into_vec::<std::alloc::Global>` in statics
140   --> $DIR/check-values-constraints.rs:117:32
141    |

161 LL |         x.clone()
162    |          ++++++++
---
-   --> /checkout/tests/ui/statics/check-values-constraints.rs:81:33
-   --> /checkout/tests/ui/statics/check-values-constraints.rs:81:33
-   --> /checkout/tests/ui/statics/check-values-constraints.rs:81:33
-   --> /checkout/tests/ui/statics/check-values-constraints.rs:96:5
- LL |     vec![MyOwned], //~ ERROR allocations are not allowed in statics
-   --> /checkout/tests/ui/statics/check-values-constraints.rs:96:5
- LL |     vec![MyOwned], //~ ERROR allocations are not allowed in statics
-   --> /checkout/tests/ui/statics/check-values-constraints.rs:96:5
- LL |     vec![MyOwned], //~ ERROR allocations are not allowed in statics
-   --> /checkout/tests/ui/statics/check-values-constraints.rs:98:5
- LL |     vec![MyOwned], //~ ERROR allocations are not allowed in statics
-   --> /checkout/tests/ui/statics/check-values-constraints.rs:98:5
- LL |     vec![MyOwned], //~ ERROR allocations are not allowed in statics
-   --> /checkout/tests/ui/statics/check-values-constraints.rs:98:5
- LL |     vec![MyOwned], //~ ERROR allocations are not allowed in statics
-   --> /checkout/tests/ui/statics/check-values-constraints.rs:103:6
- LL |     &vec![MyOwned], //~ ERROR allocations are not allowed in statics
-   --> /checkout/tests/ui/statics/check-values-constraints.rs:103:6
- LL |     &vec![MyOwned], //~ ERROR allocations are not allowed in statics
-   --> /checkout/tests/ui/statics/check-values-constraints.rs:103:6
- LL |     &vec![MyOwned], //~ ERROR allocations are not allowed in statics
-   --> /checkout/tests/ui/statics/check-values-constraints.rs:105:6
- LL |     &vec![MyOwned], //~ ERROR allocations are not allowed in statics
-   --> /checkout/tests/ui/statics/check-values-constraints.rs:105:6
- LL |     &vec![MyOwned], //~ ERROR allocations are not allowed in statics
-   --> /checkout/tests/ui/statics/check-values-constraints.rs:105:6
- LL |     &vec![MyOwned], //~ ERROR allocations are not allowed in statics
-   --> /checkout/tests/ui/statics/check-values-constraints.rs:111:31
-   --> /checkout/tests/ui/statics/check-values-constraints.rs:111:31
-   --> /checkout/tests/ui/statics/check-values-constraints.rs:111:31
-   --> /checkout/tests/ui/statics/check-values-constraints.rs:117:32
- LL |         static x: Vec<isize> = vec![3]; //~ ERROR allocations are not allowed in statics
-   --> /checkout/tests/ui/statics/check-values-constraints.rs:117:32
- LL |         static x: Vec<isize> = vec![3]; //~ ERROR allocations are not allowed in statics
-   --> /checkout/tests/ui/statics/check-values-constraints.rs:117:32
- LL |         static x: Vec<isize> = vec![3]; //~ ERROR allocations are not allowed in statics
+ error[E0015]: cannot call non-const associated function `Box::<[MyOwned; 1]>::new_uninit` in statics
+    |                                 ^^^^^^^^^^^^^
+    = note: calls in statics are limited to constant functions, tuple structs and tuple variants
+    = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
+ error[E0015]: cannot call non-const associated function `Box::<MaybeUninit<[MyOwned; 1]>>::leak::<'_>` in statics
+   --> $DIR/check-values-constraints.rs:81:33
+    |
+ LL | static STATIC11: Vec<MyOwned> = vec![MyOwned];
+    |                                 ^^^^^^^^^^^^^
+    |
+    = note: calls in statics are limited to constant functions, tuple structs and tuple variants
+    = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
+    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+ 
+ error: `write_via_move` is not yet stable as a const intrinsic
+   --> $DIR/check-values-constraints.rs:81:33
+    |
+ LL | static STATIC11: Vec<MyOwned> = vec![MyOwned];
+    |                                 ^^^^^^^^^^^^^
+    |
+    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+ help: add `#![feature(core_intrinsics)]` to the crate attributes to enable
+    |
+ LL + #![feature(core_intrinsics)]
+    |
+ 
+ error[E0015]: cannot call non-const function `vec_macro_slice_helper_unsafe::<MyOwned, 1>` in statics
+   --> $DIR/check-values-constraints.rs:81:33
+    |
+ LL | static STATIC11: Vec<MyOwned> = vec![MyOwned];
+    |                                 ^^^^^^^^^^^^^
+    |
+    = note: calls in statics are limited to constant functions, tuple structs and tuple variants
+    = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
+    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+ 
+ error[E0015]: cannot call non-const associated function `Box::<[MyOwned; 1]>::new_uninit` in statics
+    |     ^^^^^^^^^^^^^
+    = note: calls in statics are limited to constant functions, tuple structs and tuple variants
+    = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
+ error[E0015]: cannot call non-const associated function `Box::<MaybeUninit<[MyOwned; 1]>>::leak::<'_>` in statics
+   --> $DIR/check-values-constraints.rs:96:5
+    |
+ LL |     vec![MyOwned],
+    |     ^^^^^^^^^^^^^
+    |
+    = note: calls in statics are limited to constant functions, tuple structs and tuple variants
+    = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
+    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+ 
+ error: `write_via_move` is not yet stable as a const intrinsic
+   --> $DIR/check-values-constraints.rs:96:5
+    |
+ LL |     vec![MyOwned],
+    |     ^^^^^^^^^^^^^
+    |
+    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+ help: add `#![feature(core_intrinsics)]` to the crate attributes to enable
+    |
+ LL + #![feature(core_intrinsics)]
+    |
+ 
+ error[E0015]: cannot call non-const function `vec_macro_slice_helper_unsafe::<MyOwned, 1>` in statics
+   --> $DIR/check-values-constraints.rs:96:5
+    |
+ LL |     vec![MyOwned],
+    |     ^^^^^^^^^^^^^
+    |
+    = note: calls in statics are limited to constant functions, tuple structs and tuple variants
+    = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
+    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+ 
+ error[E0015]: cannot call non-const associated function `Box::<[MyOwned; 1]>::new_uninit` in statics
+    |     ^^^^^^^^^^^^^
+    = note: calls in statics are limited to constant functions, tuple structs and tuple variants
+    = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
+ error[E0015]: cannot call non-const associated function `Box::<MaybeUninit<[MyOwned; 1]>>::leak::<'_>` in statics
+   --> $DIR/check-values-constraints.rs:98:5
+    |
+ LL |     vec![MyOwned],
+    |     ^^^^^^^^^^^^^
+    |
+    = note: calls in statics are limited to constant functions, tuple structs and tuple variants
+    = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
+    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+ 
+ error: `write_via_move` is not yet stable as a const intrinsic
+   --> $DIR/check-values-constraints.rs:98:5
+    |
+ LL |     vec![MyOwned],
+    |     ^^^^^^^^^^^^^
+    |
+    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+ help: add `#![feature(core_intrinsics)]` to the crate attributes to enable
+    |
+ LL + #![feature(core_intrinsics)]
+    |
+ 
+ error[E0015]: cannot call non-const function `vec_macro_slice_helper_unsafe::<MyOwned, 1>` in statics
+   --> $DIR/check-values-constraints.rs:98:5
+    |
+ LL |     vec![MyOwned],
+    |     ^^^^^^^^^^^^^
+    |
+    = note: calls in statics are limited to constant functions, tuple structs and tuple variants
+    = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
+    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+ 
+ error[E0015]: cannot call non-const associated function `Box::<[MyOwned; 1]>::new_uninit` in statics
+    |      ^^^^^^^^^^^^^
+    = note: calls in statics are limited to constant functions, tuple structs and tuple variants
+    = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
+ error[E0015]: cannot call non-const associated function `Box::<MaybeUninit<[MyOwned; 1]>>::leak::<'_>` in statics
+   --> $DIR/check-values-constraints.rs:103:6
+    |
+ LL |     &vec![MyOwned],
+    |      ^^^^^^^^^^^^^
+    |
+    = note: calls in statics are limited to constant functions, tuple structs and tuple variants
+    = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
+    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+ 
+ error: `write_via_move` is not yet stable as a const intrinsic
+   --> $DIR/check-values-constraints.rs:103:6
+    |
+ LL |     &vec![MyOwned],
+    |      ^^^^^^^^^^^^^
+    |
+    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+ help: add `#![feature(core_intrinsics)]` to the crate attributes to enable
+    |
+ LL + #![feature(core_intrinsics)]
+    |
+ 
+ error[E0015]: cannot call non-const function `vec_macro_slice_helper_unsafe::<MyOwned, 1>` in statics
+   --> $DIR/check-values-constraints.rs:103:6
+    |
+ LL |     &vec![MyOwned],
+    |      ^^^^^^^^^^^^^
+    |
+    = note: calls in statics are limited to constant functions, tuple structs and tuple variants
+    = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
+    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+ 
+ error[E0015]: cannot call non-const associated function `Box::<[MyOwned; 1]>::new_uninit` in statics
+    |      ^^^^^^^^^^^^^
+    = note: calls in statics are limited to constant functions, tuple structs and tuple variants
+    = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
+ error[E0015]: cannot call non-const associated function `Box::<MaybeUninit<[MyOwned; 1]>>::leak::<'_>` in statics
+   --> $DIR/check-values-constraints.rs:105:6
+    |
+ LL |     &vec![MyOwned],
+    |      ^^^^^^^^^^^^^
+    |
+    = note: calls in statics are limited to constant functions, tuple structs and tuple variants
+    = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
+    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+ 
+ error: `write_via_move` is not yet stable as a const intrinsic
+   --> $DIR/check-values-constraints.rs:105:6
+    |
+ LL |     &vec![MyOwned],
+    |      ^^^^^^^^^^^^^
+    |
+    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+ help: add `#![feature(core_intrinsics)]` to the crate attributes to enable
+    |
+ LL + #![feature(core_intrinsics)]
+    |
+ 
+ error[E0015]: cannot call non-const function `vec_macro_slice_helper_unsafe::<MyOwned, 1>` in statics
+   --> $DIR/check-values-constraints.rs:105:6
+    |
+ LL |     &vec![MyOwned],
+    |      ^^^^^^^^^^^^^
+    |
+    = note: calls in statics are limited to constant functions, tuple structs and tuple variants
+    = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
+    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+ 
+ error[E0015]: cannot call non-const associated function `Box::<[isize; 1]>::new_uninit` in statics
+    |                               ^^^^^^^
+    = note: calls in statics are limited to constant functions, tuple structs and tuple variants
+    = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
+ error[E0015]: cannot call non-const associated function `Box::<MaybeUninit<[isize; 1]>>::leak::<'_>` in statics
+   --> $DIR/check-values-constraints.rs:111:31
+    |
+ LL | static STATIC19: Vec<isize> = vec![3];
+    |                               ^^^^^^^
+    |
+    = note: calls in statics are limited to constant functions, tuple structs and tuple variants
+    = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
+    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+ 
+ error: `write_via_move` is not yet stable as a const intrinsic
+   --> $DIR/check-values-constraints.rs:111:31
+    |
+ LL | static STATIC19: Vec<isize> = vec![3];
+    |                               ^^^^^^^
+    |
+    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+ help: add `#![feature(core_intrinsics)]` to the crate attributes to enable
+    |
+ LL + #![feature(core_intrinsics)]
+    |
+ 
+ error[E0015]: cannot call non-const function `vec_macro_slice_helper_unsafe::<isize, 1>` in statics
+   --> $DIR/check-values-constraints.rs:111:31
+    |
+ LL | static STATIC19: Vec<isize> = vec![3];
+    |                               ^^^^^^^
+    |
+    = note: calls in statics are limited to constant functions, tuple structs and tuple variants
+    = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
+    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+ 
+ error[E0015]: cannot call non-const associated function `Box::<[isize; 1]>::new_uninit` in statics
+    |                                ^^^^^^^
+    = note: calls in statics are limited to constant functions, tuple structs and tuple variants
+    = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
+ error[E0015]: cannot call non-const associated function `Box::<MaybeUninit<[isize; 1]>>::leak::<'_>` in statics
+   --> $DIR/check-values-constraints.rs:117:32
+    |
+ LL |         static x: Vec<isize> = vec![3];
+    |                                ^^^^^^^
+    |
+    = note: calls in statics are limited to constant functions, tuple structs and tuple variants
+    = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
+    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+ 
+ error: `write_via_move` is not yet stable as a const intrinsic
+   --> $DIR/check-values-constraints.rs:117:32
+    |
+ LL |         static x: Vec<isize> = vec![3];
+    |                                ^^^^^^^
+    |
+    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+ help: add `#![feature(core_intrinsics)]` to the crate attributes to enable
+    |
+ LL + #![feature(core_intrinsics)]
+    |
+ 
+ error[E0015]: cannot call non-const function `vec_macro_slice_helper_unsafe::<isize, 1>` in statics
+   --> $DIR/check-values-constraints.rs:117:32
+    |
+ LL |         static x: Vec<isize> = vec![3];
+    |                                ^^^^^^^
+    |
+    = note: calls in statics are limited to constant functions, tuple structs and tuple variants
+    = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
+    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+ 
+ error: aborting due to 38 previous errors
+ Some errors have detailed explanations: E0015, E0493, E0507.
+ For more information about an error, try `rustc --explain E0015`.
---
To only update this specific test, also pass `--test-args statics/check-values-constraints.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/statics/check-values-constraints.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/statics/check-values-constraints" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------
error[E0493]: destructor of `SafeStruct` cannot be evaluated at compile-time
##[error]  --> /checkout/tests/ui/statics/check-values-constraints.rs:64:7
   |
LL |       ..SafeStruct {
   |  _______^
LL | |         //~^ ERROR destructor of
LL | |         field1: SafeEnum::Variant3(WithDtor),
LL | |         field2: SafeEnum::Variant1,
LL | |     }
   | |_____^ the destructor for this type cannot be evaluated in statics
LL |   };
   |   - value is dropped here

error[E0015]: cannot call non-const associated function `Box::<[MyOwned; 1]>::new_uninit` in statics
##[error]  --> /checkout/tests/ui/statics/check-values-constraints.rs:81:33
   |
LL | static STATIC11: Vec<MyOwned> = vec![MyOwned];
   |                                 ^^^^^^^^^^^^^
   |
   = note: calls in statics are limited to constant functions, tuple structs and tuple variants
   = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0015]: cannot call non-const associated function `Box::<MaybeUninit<[MyOwned; 1]>>::leak::<'_>` in statics
##[error]  --> /checkout/tests/ui/statics/check-values-constraints.rs:81:33
   |
LL | static STATIC11: Vec<MyOwned> = vec![MyOwned];
   |                                 ^^^^^^^^^^^^^
   |
   = note: calls in statics are limited to constant functions, tuple structs and tuple variants
   = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error: `write_via_move` is not yet stable as a const intrinsic
##[error]  --> /checkout/tests/ui/statics/check-values-constraints.rs:81:33
   |
LL | static STATIC11: Vec<MyOwned> = vec![MyOwned];
   |                                 ^^^^^^^^^^^^^
   |
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
help: add `#![feature(core_intrinsics)]` to the crate attributes to enable
   |
LL + #![feature(core_intrinsics)]
   |

error[E0015]: cannot call non-const function `vec_macro_slice_helper_unsafe::<MyOwned, 1>` in statics
##[error]  --> /checkout/tests/ui/statics/check-values-constraints.rs:81:33
   |
LL | static STATIC11: Vec<MyOwned> = vec![MyOwned];
   |                                 ^^^^^^^^^^^^^
   |
   = note: calls in statics are limited to constant functions, tuple structs and tuple variants
   = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0015]: cannot call non-const method `slice::<impl [MyOwned]>::into_vec::<std::alloc::Global>` in statics
##[error]  --> /checkout/tests/ui/statics/check-values-constraints.rs:81:33
   |
LL | static STATIC11: Vec<MyOwned> = vec![MyOwned];
   |                                 ^^^^^^^^^^^^^
   |
   = note: calls in statics are limited to constant functions, tuple structs and tuple variants
   = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0015]: cannot call non-const method `<str as ToString>::to_string` in statics
##[error]  --> /checkout/tests/ui/statics/check-values-constraints.rs:92:38
   |
LL |     field2: SafeEnum::Variant4("str".to_string()), //~ ERROR cannot call non-const method
   |                                      ^^^^^^^^^^^
   |
   = note: calls in statics are limited to constant functions, tuple structs and tuple variants
   = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`

error[E0015]: cannot call non-const associated function `Box::<[MyOwned; 1]>::new_uninit` in statics
##[error]  --> /checkout/tests/ui/statics/check-values-constraints.rs:96:5
   |
LL |     vec![MyOwned], //~ ERROR allocations are not allowed in statics
   |     ^^^^^^^^^^^^^
   |
   = note: calls in statics are limited to constant functions, tuple structs and tuple variants
   = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0015]: cannot call non-const associated function `Box::<MaybeUninit<[MyOwned; 1]>>::leak::<'_>` in statics
##[error]  --> /checkout/tests/ui/statics/check-values-constraints.rs:96:5
   |
LL |     vec![MyOwned], //~ ERROR allocations are not allowed in statics
   |     ^^^^^^^^^^^^^
   |
   = note: calls in statics are limited to constant functions, tuple structs and tuple variants
   = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error: `write_via_move` is not yet stable as a const intrinsic
##[error]  --> /checkout/tests/ui/statics/check-values-constraints.rs:96:5
   |
LL |     vec![MyOwned], //~ ERROR allocations are not allowed in statics
   |     ^^^^^^^^^^^^^
   |
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
help: add `#![feature(core_intrinsics)]` to the crate attributes to enable
   |
LL + #![feature(core_intrinsics)]
   |

error[E0015]: cannot call non-const function `vec_macro_slice_helper_unsafe::<MyOwned, 1>` in statics
##[error]  --> /checkout/tests/ui/statics/check-values-constraints.rs:96:5
   |
LL |     vec![MyOwned], //~ ERROR allocations are not allowed in statics
   |     ^^^^^^^^^^^^^
   |
   = note: calls in statics are limited to constant functions, tuple structs and tuple variants
   = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0015]: cannot call non-const method `slice::<impl [MyOwned]>::into_vec::<std::alloc::Global>` in statics
##[error]  --> /checkout/tests/ui/statics/check-values-constraints.rs:96:5
   |
LL |     vec![MyOwned], //~ ERROR allocations are not allowed in statics
   |     ^^^^^^^^^^^^^
   |
   = note: calls in statics are limited to constant functions, tuple structs and tuple variants
   = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0015]: cannot call non-const associated function `Box::<[MyOwned; 1]>::new_uninit` in statics
##[error]  --> /checkout/tests/ui/statics/check-values-constraints.rs:98:5
   |
LL |     vec![MyOwned], //~ ERROR allocations are not allowed in statics
   |     ^^^^^^^^^^^^^
   |
   = note: calls in statics are limited to constant functions, tuple structs and tuple variants
   = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0015]: cannot call non-const associated function `Box::<MaybeUninit<[MyOwned; 1]>>::leak::<'_>` in statics
##[error]  --> /checkout/tests/ui/statics/check-values-constraints.rs:98:5
   |
LL |     vec![MyOwned], //~ ERROR allocations are not allowed in statics
   |     ^^^^^^^^^^^^^
   |
   = note: calls in statics are limited to constant functions, tuple structs and tuple variants
   = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error: `write_via_move` is not yet stable as a const intrinsic
##[error]  --> /checkout/tests/ui/statics/check-values-constraints.rs:98:5
   |
LL |     vec![MyOwned], //~ ERROR allocations are not allowed in statics
   |     ^^^^^^^^^^^^^
   |
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
help: add `#![feature(core_intrinsics)]` to the crate attributes to enable
   |
LL + #![feature(core_intrinsics)]
   |

error[E0015]: cannot call non-const function `vec_macro_slice_helper_unsafe::<MyOwned, 1>` in statics
##[error]  --> /checkout/tests/ui/statics/check-values-constraints.rs:98:5
   |
LL |     vec![MyOwned], //~ ERROR allocations are not allowed in statics
   |     ^^^^^^^^^^^^^
   |
   = note: calls in statics are limited to constant functions, tuple structs and tuple variants
   = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0015]: cannot call non-const method `slice::<impl [MyOwned]>::into_vec::<std::alloc::Global>` in statics
##[error]  --> /checkout/tests/ui/statics/check-values-constraints.rs:98:5
   |
LL |     vec![MyOwned], //~ ERROR allocations are not allowed in statics
   |     ^^^^^^^^^^^^^
   |
   = note: calls in statics are limited to constant functions, tuple structs and tuple variants
   = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0015]: cannot call non-const associated function `Box::<[MyOwned; 1]>::new_uninit` in statics
##[error]  --> /checkout/tests/ui/statics/check-values-constraints.rs:103:6
   |
LL |     &vec![MyOwned], //~ ERROR allocations are not allowed in statics
   |      ^^^^^^^^^^^^^
   |
   = note: calls in statics are limited to constant functions, tuple structs and tuple variants
   = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0015]: cannot call non-const associated function `Box::<MaybeUninit<[MyOwned; 1]>>::leak::<'_>` in statics
##[error]  --> /checkout/tests/ui/statics/check-values-constraints.rs:103:6
   |
LL |     &vec![MyOwned], //~ ERROR allocations are not allowed in statics
   |      ^^^^^^^^^^^^^
   |
   = note: calls in statics are limited to constant functions, tuple structs and tuple variants
   = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error: `write_via_move` is not yet stable as a const intrinsic
##[error]  --> /checkout/tests/ui/statics/check-values-constraints.rs:103:6
   |
LL |     &vec![MyOwned], //~ ERROR allocations are not allowed in statics
   |      ^^^^^^^^^^^^^
   |
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
help: add `#![feature(core_intrinsics)]` to the crate attributes to enable
   |
LL + #![feature(core_intrinsics)]
   |

error[E0015]: cannot call non-const function `vec_macro_slice_helper_unsafe::<MyOwned, 1>` in statics
##[error]  --> /checkout/tests/ui/statics/check-values-constraints.rs:103:6
   |
LL |     &vec![MyOwned], //~ ERROR allocations are not allowed in statics
   |      ^^^^^^^^^^^^^
   |
   = note: calls in statics are limited to constant functions, tuple structs and tuple variants
   = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0015]: cannot call non-const method `slice::<impl [MyOwned]>::into_vec::<std::alloc::Global>` in statics
##[error]  --> /checkout/tests/ui/statics/check-values-constraints.rs:103:6
   |
LL |     &vec![MyOwned], //~ ERROR allocations are not allowed in statics
   |      ^^^^^^^^^^^^^
   |
   = note: calls in statics are limited to constant functions, tuple structs and tuple variants
   = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0015]: cannot call non-const associated function `Box::<[MyOwned; 1]>::new_uninit` in statics
##[error]  --> /checkout/tests/ui/statics/check-values-constraints.rs:105:6
   |
LL |     &vec![MyOwned], //~ ERROR allocations are not allowed in statics
   |      ^^^^^^^^^^^^^
   |
   = note: calls in statics are limited to constant functions, tuple structs and tuple variants
   = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0015]: cannot call non-const associated function `Box::<MaybeUninit<[MyOwned; 1]>>::leak::<'_>` in statics
##[error]  --> /checkout/tests/ui/statics/check-values-constraints.rs:105:6
   |
LL |     &vec![MyOwned], //~ ERROR allocations are not allowed in statics
   |      ^^^^^^^^^^^^^
   |
   = note: calls in statics are limited to constant functions, tuple structs and tuple variants
   = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error: `write_via_move` is not yet stable as a const intrinsic
##[error]  --> /checkout/tests/ui/statics/check-values-constraints.rs:105:6
   |
LL |     &vec![MyOwned], //~ ERROR allocations are not allowed in statics
   |      ^^^^^^^^^^^^^
   |
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
help: add `#![feature(core_intrinsics)]` to the crate attributes to enable
   |
LL + #![feature(core_intrinsics)]
   |

error[E0015]: cannot call non-const function `vec_macro_slice_helper_unsafe::<MyOwned, 1>` in statics
##[error]  --> /checkout/tests/ui/statics/check-values-constraints.rs:105:6
   |
LL |     &vec![MyOwned], //~ ERROR allocations are not allowed in statics
   |      ^^^^^^^^^^^^^
   |
   = note: calls in statics are limited to constant functions, tuple structs and tuple variants
   = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0015]: cannot call non-const method `slice::<impl [MyOwned]>::into_vec::<std::alloc::Global>` in statics
##[error]  --> /checkout/tests/ui/statics/check-values-constraints.rs:105:6
   |
LL |     &vec![MyOwned], //~ ERROR allocations are not allowed in statics
   |      ^^^^^^^^^^^^^
   |
   = note: calls in statics are limited to constant functions, tuple structs and tuple variants
   = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0015]: cannot call non-const associated function `Box::<[isize; 1]>::new_uninit` in statics
##[error]  --> /checkout/tests/ui/statics/check-values-constraints.rs:111:31
   |
LL | static STATIC19: Vec<isize> = vec![3];
   |                               ^^^^^^^
   |
   = note: calls in statics are limited to constant functions, tuple structs and tuple variants
   = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0015]: cannot call non-const associated function `Box::<MaybeUninit<[isize; 1]>>::leak::<'_>` in statics
##[error]  --> /checkout/tests/ui/statics/check-values-constraints.rs:111:31
   |
LL | static STATIC19: Vec<isize> = vec![3];
   |                               ^^^^^^^
   |
   = note: calls in statics are limited to constant functions, tuple structs and tuple variants
   = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error: `write_via_move` is not yet stable as a const intrinsic
##[error]  --> /checkout/tests/ui/statics/check-values-constraints.rs:111:31
   |
---
   |
LL | static STATIC19: Vec<isize> = vec![3];
   |                               ^^^^^^^
   |
   = note: calls in statics are limited to constant functions, tuple structs and tuple variants
   = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0015]: cannot call non-const method `slice::<impl [isize]>::into_vec::<std::alloc::Global>` in statics
##[error]  --> /checkout/tests/ui/statics/check-values-constraints.rs:111:31
   |
LL | static STATIC19: Vec<isize> = vec![3];
   |                               ^^^^^^^
   |
   = note: calls in statics are limited to constant functions, tuple structs and tuple variants
   = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0015]: cannot call non-const associated function `Box::<[isize; 1]>::new_uninit` in statics
##[error]  --> /checkout/tests/ui/statics/check-values-constraints.rs:117:32
   |
LL |         static x: Vec<isize> = vec![3]; //~ ERROR allocations are not allowed in statics
   |                                ^^^^^^^
   |
   = note: calls in statics are limited to constant functions, tuple structs and tuple variants
   = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0015]: cannot call non-const associated function `Box::<MaybeUninit<[isize; 1]>>::leak::<'_>` in statics
##[error]  --> /checkout/tests/ui/statics/check-values-constraints.rs:117:32
   |
LL |         static x: Vec<isize> = vec![3]; //~ ERROR allocations are not allowed in statics
   |                                ^^^^^^^
   |
   = note: calls in statics are limited to constant functions, tuple structs and tuple variants
   = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error: `write_via_move` is not yet stable as a const intrinsic
##[error]  --> /checkout/tests/ui/statics/check-values-constraints.rs:117:32
   |
LL |         static x: Vec<isize> = vec![3]; //~ ERROR allocations are not allowed in statics
   |                                ^^^^^^^
   |
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
help: add `#![feature(core_intrinsics)]` to the crate attributes to enable
   |
LL + #![feature(core_intrinsics)]
   |

error[E0015]: cannot call non-const function `vec_macro_slice_helper_unsafe::<isize, 1>` in statics
##[error]  --> /checkout/tests/ui/statics/check-values-constraints.rs:117:32
   |
LL |         static x: Vec<isize> = vec![3]; //~ ERROR allocations are not allowed in statics
   |                                ^^^^^^^
   |
   = note: calls in statics are limited to constant functions, tuple structs and tuple variants
   = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0015]: cannot call non-const method `slice::<impl [isize]>::into_vec::<std::alloc::Global>` in statics
##[error]  --> /checkout/tests/ui/statics/check-values-constraints.rs:117:32
   |
LL |         static x: Vec<isize> = vec![3]; //~ ERROR allocations are not allowed in statics
   |                                ^^^^^^^
   |
   = note: calls in statics are limited to constant functions, tuple structs and tuple variants
   = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0507]: cannot move out of static item `x`
##[error]  --> /checkout/tests/ui/statics/check-values-constraints.rs:119:9
   |
LL |         x
   |         ^ move occurs because `x` has type `Vec<isize>`, which does not implement the `Copy` trait
   |
help: consider borrowing here
   |
LL |         &x
   |         +
---
---- [ui] tests/ui/unpretty/box.rs stdout ----

error: test compilation failed although it shouldn't!
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/unpretty/box.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/unpretty/box" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Zunpretty=thir-tree"
stdout: none
--- stderr -------------------------------
error[E0425]: cannot find function `box_new` in module `std::boxed`
##[error]  --> /checkout/tests/ui/unpretty/box.rs:7:25
   |

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (94a44ae): comparison URL.

Overall result: ❌ regressions - please read the text below

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @rustbot label: +perf-regression-triaged. If not, please fix the regressions and do another perf run. If its results are neutral or positive, the label will be automatically removed.

@bors rollup=never
@rustbot label: -S-waiting-on-perf +perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
0.7% [0.2%, 2.3%] 45
Regressions ❌
(secondary)
4.4% [0.3%, 21.2%] 38
Improvements ✅
(primary)
-0.3% [-0.3%, -0.3%] 1
Improvements ✅
(secondary)
-0.1% [-0.1%, -0.1%] 4
All ❌✅ (primary) 0.7% [-0.3%, 2.3%] 46

Max RSS (memory usage)

Results (primary -0.0%, secondary 3.6%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
1.8% [0.5%, 3.1%] 7
Regressions ❌
(secondary)
3.6% [2.1%, 6.4%] 6
Improvements ✅
(primary)
-6.6% [-8.1%, -5.2%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.0% [-8.1%, 3.1%] 9

Cycles

Results (primary 2.3%, secondary 6.8%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
2.3% [2.1%, 2.7%] 4
Regressions ❌
(secondary)
6.8% [1.7%, 23.3%] 22
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.3% [2.1%, 2.7%] 4

Binary size

Results (primary 1.2%, secondary 12.3%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
1.2% [0.1%, 6.2%] 72
Regressions ❌
(secondary)
12.7% [1.3%, 46.3%] 29
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.0% [-0.0%, -0.0%] 1
All ❌✅ (primary) 1.2% [0.1%, 6.2%] 72

Bootstrap: 474.484s -> 475.534s (0.22%)
Artifact size: 388.66 MiB -> 390.34 MiB (0.43%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Oct 20, 2025
@rust-bors
Copy link

rust-bors bot commented Oct 20, 2025

☀️ Try build successful (CI)
Build commit: 92f90ff (92f90ff6eddf195399511a2a85baf0d4be74a933, parent: 4068bafedd8ba724e332a5221c06a6fa531a30d2)

@RalfJung
Copy link
Member Author

Even just changing Box::new causes non-trivial regressions... no point in worrying about vec! until we find a way to avoid that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

perf-regression Performance regression. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants